package com.xuecheng.base.expection;

/**
 * @Author: Ren(任佳宝)
 * @Description: XueChengPlusException
 * @Date: 2024/8/21 下午8:20
 * @Version: 1.0
 */

public class XueChengPlusException extends RuntimeException {
    private String errMessage;

    public XueChengPlusException() {
        super();
    }

    public XueChengPlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new XueChengPlusException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new XueChengPlusException(errMessage);
    }
}
